package com.webchat.rmi.aigc;

import com.webchat.common.bean.APIResponseBean;
import com.webchat.domain.dto.aigc.mall.MallAutoReplayReqDTO;
import com.webchat.domain.vo.dto.mall.im.AIGCRecommendAnswerReqDTO;
import com.webchat.domain.vo.request.mall.im.MallChatRecommendAnswerReqVO;
import com.webchat.rmi.config.FeignConfig;
import com.webchat.rmi.interceptor.RpcRequestInterceptor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import reactor.core.publisher.Flux;


/**
 * AIGC FOR MALL
 */
@FeignClient(name = "webchat-aigc-service",
             contextId = "aiMallServiceClient",
             configuration = {RpcRequestInterceptor.class})
public interface AIMallServiceClient {


    /**
     * 商家智能客服ai代发
     *
     * @param mallAutoReplayReq
     * @return
     */
    @PostMapping(value = "/aigc-service/mall/im/autoReplay")
    APIResponseBean<String> aiAutoReply(@RequestBody MallAutoReplayReqDTO mallAutoReplayReq);


    /**
     * 电商智能客服问题推荐
     *
     * @param aigcRecommendAnswerReqDTO
     * @return
     */
    @PostMapping(value = "/aigc-service/mall/im/recommend/answer", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
    Flux<String> recommendAnswers(@RequestBody AIGCRecommendAnswerReqDTO aigcRecommendAnswerReqDTO);
 }
